import React, { Component } from 'react';


import { ThemeContext } from './createContext';

class View extends Component{

    static contextType = ThemeContext;
    list(test){
        console.log(test)
    }
    render(){
        // console.log(this.context)
        // const _this = this;
        return (
            <div className="m">
                <h3>内容1-------{this.context}</h3>
                <ThemeContext.Consumer>
                    {(value)=>(
                        <div>11111-----{value}{this.list(value)}</div>
                    )}
                </ThemeContext.Consumer>
            </div>
        )
    }
}
// View.contextType = ThemeContext;

export default View;
